<?php
$website = get_option('website');
$install_path = get_option('install_path');
$website_path = $website.$install_path;

preg_match("/([^\/]+)\/(.+)/", $_SERVER['REQUEST_URI'], $thisslug);

$pageslug = str_replace("/", "", $thisslug[2]);
$pagetitle = showtitle($thisslug[1],$pageslug);
$pagemeta = showmeta($thisslug[1],$pageslug);

	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" CONTENT="<?php print $pagemeta; ?>">
<title>myaudiometer -> <?php print $pagetitle; ?></title>
<link rel="stylesheet" type="text/css" href="<? print $website_path; ?>theme/css/style.css"/>
<link rel="stylesheet" type="text/css" href="<? print $website_path; ?>theme/css/jquery.ui/jquery-ui-1.8.16.custom.css" />
<link rel="stylesheet" type="text/css" href="<? print $website_path; ?>theme/css/colorbox.css" />
<link rel="stylesheet" type="text/css" href="<? print $website_path; ?>theme/css/jquery.slider.css" />


<script type="text/javascript" src="<? print $website_path; ?>theme/js/jquery-1.5.2.min.js"></script>
<script type="text/javascript" src="<? print $website_path; ?>theme/js/jquery-ui-1.8.16.custom.min.js"></script> 
<script type="text/javascript" src="<? print $website_path; ?>theme/js/jquery.colorbox-min.js"></script> 
<script type="text/javascript" src="<? print $website_path; ?>theme/js/jquery.validate.js"></script>
<script type="text/javascript" src="<? print $website_path; ?>theme/js/flashEx.js"></script>
<script type="text/javascript" src="<? print $website_path; ?>theme/js/swfobject_modified.js"></script>
<script type="text/javascript" src="<? print $website_path; ?>theme/js/jquery.slider.js"></script>

<style type="text/css">
input.error {border:#F00 solid 1px;}
label.error {float:left; color: red; padding-top:2px; padding-left: .5em; vertical-align: top; }
BODY{font-family:Calibri, Tahoma, Verdana, Arial; margin: 0px 0px 0px 0px; font-size:13px; background:url(<? print $website_path; ?>theme/images/page_bg.jpg); background-repeat:repeat-x; height:100%;}

</style>

<!--[if IE 8 ]>
<link rel="stylesheet" type="text/css" href="<? print $website_path; ?>css/style_ie.css"/>
<![endif]-->
<!--[if IE 7 ]>
<link rel="stylesheet" type="text/css" href="<? print $website_path; ?>css/style_ie7.css"/>
<![endif]-->

    <style>
	#button { padding: .5em 1em; text-decoration: none; }
	#effect { width:100%; height: 600px; top:0px; display:none; position:absolute; vertical-align:top; text-align:center;}
	.topcontent {width:939px; height:500px; background-color:#9F6;}
	</style>
	<script>
	$(document).ready(function(){
			$(".contact_link").colorbox({width:"850", height:"500", iframe:true});
			$(".comment_link").colorbox({width:"500", height:"250", iframe:true});
			$("#newsForm").validate( );
		});	
			
	$(function() {
	$( "#accordion" ).accordion({
			autoHeight: false,
			navigation: true
		});
	
	});
	
    </script>

<script type="text/javascript">

 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-3900532-18']);
 _gaq.push(['_trackPageview']);

 (function() {
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 })();

</script>



</head>

<body>
	


<center>

     
    <!-- pagetop_wrap -->
    
	<div class="pagewrap">
     
    <!-- thepage -->
    <div class="thepage">
    
   
    <!-- pagetop_head -->
	<div class="pagetop_head">
    <div class="pagetop_logo"><a href="<? print $website_path; ?>"><img src="<? print $website_path; ?>theme/images/logo.png" border="0" /></a></div>
     <!-- AddThis Button BEGIN -->
     <div class="pagetop_addthis">
        <div class="addthis_default_style" style="float:right;">
        <a class="addthis_button_email"></a>
        <a class="addthis_button_facebook"></a>
        <a class="addthis_button_twitter"></a>
        <a class="addthis_button_linkedin"></a>	 
        </div>
        <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4d1bb5041e6d5e7f"></script>
     </div>   
        <!-- AddThis Button END -->
    <div class="pagetop_contact"><a class="contact_link" href="../../theme/contact.php">Contact us</a></div>
    </div>
    <!-- pagetop_head END -->
   
   <div class="subpage_top">
   <?php 
   $flashToPlay = "myaudiometer.swf";
  
   if (preg_match("/Immittance/i", $_SERVER['REQUEST_URI'])) {
   		$flashToPlay = "Audiometry-Immittance.swf";
	}
	
    if (preg_match("/EMR/i", $_SERVER['REQUEST_URI'])) {
   		$flashToPlay = "EMR-Ready.swf";
	}
   
   ?>
	
    	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="929" height="187" id="services" align="middle">
				<param name="movie" value="<? print $website_path.$flashToPlay; ?>" />
				<param name="quality" value="high" />
				<param name="bgcolor" value="#ffffff" />
				<param name="play" value="true" />
				<param name="loop" value="true" />
				<param name="wmode" value="transparent" />
				<param name="scale" value="showall" />
				<param name="menu" value="true" />
				<param name="devicefont" value="false" />
				<param name="salign" value="" />
				<param name="allowScriptAccess" value="sameDomain" />
				<!--[if !IE]>-->
				<object type="application/x-shockwave-flash" data="<? print $website_path.$flashToPlay; ?>" width="929" height="187">
					<param name="movie" value="<?php print  $flashToPlay ?>" />
					<param name="quality" value="high" />
					<param name="bgcolor" value="#ffffff" />
					<param name="play" value="true" />
					<param name="loop" value="true" />
					<param name="wmode" value="transparent" />
					<param name="scale" value="showall" />
					<param name="menu" value="true" />
					<param name="devicefont" value="false" />
					<param name="salign" value="" />
					<param name="allowScriptAccess" value="sameDomain" />
				<!--<![endif]-->
					<a href="http://www.adobe.com/go/getflash">
						<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
					</a>
				<!--[if !IE]>-->
				</object>
				<!--<![endif]-->
			</object>
   
	
    </div>
    <?php
    print "<div class=\"block_divine\">&nbsp;</div>";
    ?>
<div class="subpage_col_left">

	<div class="subpage_news_box">
    <?php
	
	
	$news_to_show = get_news_to_show($pageslug);
	$thisnews = show_news($news_to_show);
	
    print "<div class=\"subpage_news_title\">";
	if($news_to_show == 0)
	{
		print "Latest news";
	}
	else
	print $thisnews['post_title'];
	print "</div>";
    print "<div class=\"subpage_news_short_content\">";
	
	
	
	print substr($thisnews['post_excerpt'], 0,250)."...";
	
	
	
	
	print "</div>";
    print "<div class=\"subpage_news_link\"><a href=\"".$website_path."entry/".$thisnews['post_title_slug']."\">Read more</a></div>"; 
      ?>
    </div>
    <form action="../../theme/subscribe.php" method="POST" id="newsForm" name="newsForm" class="cmxform">
    <div class="subpage_news_sub">
    <div class="subpage_news_sub_title">Sign up to get the latest news from myaudiometer</div>

	
    <input id="cemail" name="email" value="Enter your email here" class="subpage_news_sub_input required email" />
 	<input class="subpage_news_sub_send" name="Send" type="submit" value="Send" />
   	<script type="text/javascript">
		$("input, textarea").focus(function(){if(this.value == this.defaultValue){this.select();}})
		$("input, textarea").mouseup(function(e){e.preventDefault();});
		
	</script>
    
    </div>
    </form>
</div>